<template>
	<view>
		<button @click="isDateTimePickerVisible = true">选择日期时间</button>
		<v-date-time v-model:value="dateTimeValue" v-model:show="isDateTimePickerVisible" @close="handleClose" @confirm="handleConfirm" />
	</view>
</template>

<script lang="ts" setup>
import { ref } from 'vue';

const isDateTimePickerVisible = ref(false);
const dateTimeValue = ref(new Date);

function handleClose() {
	console.log('关闭选择器');
}
const handleConfirm = (value : any) => {
	console.log("选中的值:",value);
}
</script>
